home *** CD-ROM | disk | FTP | other *** search
- #include <sys/types.h>
- #include <sys/security.h>
- #include <prot.h>
- #include <pwd.h>
- #include <stdio.h>
-
- #ifdef SecureWare
- /*
- * Get the ``protected password database'' information for a user,
- * and fish their encrypted password from it. This program must be
- * setgid ``auth'' for this to work.
- */
- struct passwd *
- sco_getpwnam (user)
- char *user;
- {
- struct passwd *pwd;
- struct pr_passwd *pr_pwd;
-
- if ((pwd = getpwnam (user)) == (struct passwd *) NULL)
- {
- return ((struct passwd *) NULL);
- }
-
- if ((pr_pwd = getprpwnam (user)) == (struct pr_passwd *) NULL)
- {
- return ((struct passwd *) NULL);
- }
-
- pwd->pw_passwd = pr_pwd->ufld.fd_encrypt;
-
- return (pwd);
- }
- #endif /* SecureWare */
-